{$CLEO .cs}
$X_Sweet_House  = 0 
$y_Sweet_House = 0 
$Sweet_Car = 0
023C: load_special_actor 'psycho' as 5 // models 290-299
038B: load_requested_models
1@ = audiostream.Load3D("cleo\battle_maps\powerup.mp3")
//audiostream.Loop(1@,1)
:respawn
7@ = 0
2@ = 0 
0@ = actor.Create(23, #SPECIAL05,   3741.2151, -1108.4772, 1631.668)
actor.Angle(0@) =   350.419
actor.Health(0@) = 99999999999
0446: set_actor 0@ dismemberment_possible 0
actor.SetImmunities(0@,1,1,1,1,1)
0638: AS_actor 0@ stay_put 1
077C: clear_actor 0@ acquaintance 4 to_all_pedtypes // see ped.dat
077C: clear_actor 0@ acquaintance 3 to_all_pedtypes // see ped.dat
077C: clear_actor 0@ acquaintance 2 to_all_pedtypes // see ped.dat
077C: clear_actor 0@ acquaintance 1 to_all_pedtypes // see ped.dat

32@ = 0


Audiostream.LinkToActor(1@,0@)
060A: create_decision_maker_type 0 store_to 11@ // decision\allowed\m_.ped files
0978: copy_decision_maker 11@ to 9@
060B: set_actor 0@ decision_maker_to 9@
064B: 6@ = create_particle "vent2" at  3733.4746 -1026.276 1631.668 type 1
064C: make_particle 6@ visible

0446: set_actor 0@ dismemberment_possible 0    
33@ = 0
actor.SetWalkStyle(0@ , "player")
0296: unload_special_actor 5
32@ = 15000
33@ = 15000
:main
wait 0
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 1 time -1

04C4: store_coords_to  3@ 4@ 5@  from_actor 0@ with_offset 0.0 0.0 0.0
//gosub @random
if  and 
7@ == 645
actor.Dead(0@)
then
audiostream.PerformAction(1@,stop)   
$Sweet_Car += 1
7@ = 1
32@ = 0
0948: create_explosion_at  3@ 4@ 5@ type 11 camera_shake 3.0
0337: set_actor 0@ visibility 0
0619: enable_actor 0@ collision_detection 0
jump @respawn  
end
if
  $actor_sweet == 0
then


0A92: create_custom_thread "battle_maps\airport_luigi_magic.cs"  
jump @goto
end
if  or
2@ >= 3
 $onmission == 0 
then
:goto
0650: destroy_particle 6@

 audiostream.Release(1@)
actor.DestroyInstantly(0@)


0A93: end_custom_thread 
end_thread
end
:powermagic
if and
32@ >= 20000
$X_Sweet_House == 0
056D:   actor $player_actor  defined

then
if
00F3:   actor $PLAYER_ACTOR near_actor 0@ radius 2.0 2.0 sphere 0 on_foot
then
if  and
0ACD: show_text_highpriority "Press this ~g~~k~~VEHICLE_ENTER_EXIT~~w~ to use." time 500

00E1:   player 0 pressed_key 15
then

$X_Sweet_House = 1
04C4: store_coords_to  3@ 4@ 5@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0

064B: 31@ = create_particle "heli_dust" at 3@ 4@ 5@  type 1
064C: make_particle 31@ visible
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1
01F7: set_player $PLAYER_CHAR ignored_by_cops 1

audiostream.PerformAction(1@, play)
0812: AS_actor $player_actor perform_animation "CLIMB_idle" IFP "ped" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 3000  // versionB
wait 3000
0650: remove_references_to_particle 31@
wait 1000
064E: stop_particle 6@
2@ += 1
32@ = 0
33@ = 0
end
end   
end 
if and
32@ >= 20000
$y_Sweet_House == 0
056D:   actor $second_player_actor  defined

then
if
00F3:   actor $second_player_actor near_actor 0@ radius 2.0 2.0 sphere 0 on_foot

then
0ACD: show_text_highpriority "Press this ~g~~k~~VEHICLE_ENTER_EXIT~~w~ to use." time 500
if  
00E1:   player 1 pressed_key 15
then
$y_Sweet_House = 1
04C4: store_coords_to  3@ 4@ 5@ from_actor $second_player_actor with_offset 0.0 0.0 0.0

064B: 31@ = create_particle "heli_dust" at 3@ 4@ 5@  type 1
064C: make_particle 31@ visible
03BF: set_player $second_player ignored_by_everyone 1
01F7: set_player $second_player ignored_by_cops 1

audiostream.PerformAction(1@, play)
0812: AS_actor $second_player_actor perform_animation "CLIMB_idle" IFP "ped" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 3000  // versionB
wait 3000
0650: remove_references_to_particle 31@

wait 1000
064E: stop_particle 6@

2@ += 1
32@ = 0
33@ = 0
end
end
end   
if  and
33@ >= 20000
$X_Sweet_House == 1
then
$X_Sweet_House = 0
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
01F7: set_player $PLAYER_CHAR ignored_by_cops 0
33@ = 0
end  
if  and
33@ >= 20000
$y_Sweet_House == 1
then
$y_Sweet_House = 0
33@ = 0 

end

if and
$X_Sweet_House == 1
056D:   actor $player_actor  defined
then
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1
01F7: set_player $PLAYER_CHAR ignored_by_cops 1
end
if and
$y_Sweet_House == 1
056D:   actor $second_player_actor  defined
then
03BF: set_player $second_player ignored_by_everyone 0
01F7: set_player $second_player ignored_by_cops 0
end


if
32@ >= 20000
then
064C: make_particle 6@ visible

end
if
056D:   actor $second_player_actor defined

then
$y_Sweet_House = 0
03BF: set_player $second_player ignored_by_everyone 0
01F7: set_player $second_player ignored_by_cops 0
33@ = 0
end
 {
if  and
32@ > 8000
7@ == 1
then
jump @respawn 
jump @goto
end }
jump @main

    {
:get
0209: 17@ = random_int_in_ranges 0 3
if
17@ == 0
then
0AE1: 30@ = random_actor_near_point 3@ 4@ 5@ in_radius 30.0 find_next 1 pass_deads 1

end
if
17@ == 1
then
30@ = actor.EmulateFromPlayer($PLAYER_CHAR)
end
if
17@ == 2
then

if
056D:   actor $second_player_actor  defined

then
30@ = actor.EmulateFromPlayer($second_player)
end
end
return
         }

:random
return
0209: 12@ = random_int_in_ranges 0 200

if
12@ == 3
then
0446: set_actor 0@ dismemberment_possible 0
end
if
12@ == 14
then
0446: set_actor 0@ dismemberment_possible 1
end
if
12@ == 121
then
08AF: set_actor 0@ max_health_to 1

actor.Health(0@) = 1
end
if
12@ == 90
then
//actor.Health(0@) = 1000
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 128
then
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 177
then
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 128
then
08AF: set_actor 0@ max_health_to 2000

actor.Health(0@) = 2000
end
if
12@ == 111
then
0446: set_actor 0@ dismemberment_possible 0


end
if
12@ == 81
then
0446: set_actor 0@ dismemberment_possible 0


end
return